package com.huluobo.lib_http

import com.zyj.retrofit.adapter.FlowCallAdapterFactory
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

/**
 *  Created by LC on 2025/8/11.
 */
class VideoRetrofitImpl : BaseRetrofitImpl() {
    override fun createRetrofit(): Retrofit {
        return Retrofit.Builder()
            .baseUrl(Const.VIDEO_URL)
            .client(createHttp().addInterceptor { chain ->
                chain.proceed(
                    chain.request().newBuilder().addHeader(
                        Const.VIDEO_TOKEN,
                        "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhdXRoMCIsImV4cCI6MTc1NTQ4NTM4NywidXNlcm5hbWUiOiJsYzIyIn0.DXI1Mivsm4gzk0BCMIq6YgEPvRRApZ9hWQP7Cu7S-dw"
                    ).build()
                )
            }.build())
            .addConverterFactory(GsonConverterFactory.create())
            .addCallAdapterFactory(FlowCallAdapterFactory.create())
            .build()
    }
}